import { Controller, Get, Post, Request, Query, Body,Param } from '@nestjs/common';
import { CashflowService } from './cashflow.service';

@Controller('cashflow')
export class CashflowController {
  constructor(private cashflowService: CashflowService) {}
  @Get()
  getCashflow(@Query() query) {
    return this.cashflowService.getSomething(query.sth || '');
  }

  @Get('/q/:sth')
  find(@Param() params) {
    console.log('GET /q/:sth', params);
    return this.cashflowService.getSomething(params.sth || '');
  }

  @Post()
  postCashflow(@Body() body) {
    return this.cashflowService.getSomething(body) + 'POST';
  }
}
